with open('./6666/my_diary.text','w',encoding='utf-8') as f:
    s='''2023-10-01 晴\n今天学习了python的文件操作\n'''
    f.write(s)
    f.flush()
    f.close()